package com.xnfh.planting.ui.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
import com.xnfh.image.ImageHelper
import com.xnfh.image.ImageUrl
import com.xnfh.planting.R
import com.xnfh.planting.databinding.ItemFindFieldRecordsImageBinding

/**
 * @Description:
 * @Author: ziheng
 * @CreateDate: 2023/12/18 13:29
 * @UpdateUser: ziheng
 * @UpdateDate: 2023/12/18 13:29
 * @UpdateRemark: 更新说明
 */
class FindFieldRecordsImageAdapter: BaseQuickAdapter<String,BaseDataBindingHolder<ItemFindFieldRecordsImageBinding>>(
    R.layout.item_find_field_records_image) {
    override fun convert(
        holder: BaseDataBindingHolder<ItemFindFieldRecordsImageBinding>,
        item: String
    ) {
        val dataBinding = holder.dataBinding
        ImageHelper.instance?.loadNetImg(context,ImageUrl.BASEURL+item,dataBinding?.findFieldRecordsImage,
            com.xnfh.common.R.mipmap.image_error, com.xnfh.common.R.mipmap.image_error)
    }
}